pimpas.Interval = Class.create( );
pimpas.Extends(pimpas.Interval.prototype, pimpas.Timer);
pimpas.Extends(pimpas.Interval.prototype, 
	{
		interval: null,
		initialize: function(timer, method, ref) {
			this.timer = timer;
			this.method = method;
			this.ref = ref;
		},
		process: function() {
			if(!this.executing) return;
			this.method.call(this.ref);
		},
		go: function() {
			if(this.executing) return;
			this.executing = true;
			this.interval = window.setInterval(this.process.bind(this), this.timer);
		},
		stop: function() {
			if(!this.executing) return;
			this.executing = false;
			window.clearInterval( this.interval );
		}
	}
);